package cs.sy.common.util;

import java.io.StringReader;

import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

public class BaseReaderXml {
	public SAXReader getSAXReader() {
		return new SAXReader();
	}

	public Document getDocument(String file) throws Exception {
		StringReader in = new StringReader(file);
		return this.getSAXReader().read(in);
	}

	public Element getRootElement(String file) throws Exception {
		return this.getDocument(file).getRootElement();
	}
	
	
}
